<header>
	<h3><?php echo $module_title ?> <span>- <?php echo $module_title_desc ?></span></h3>
</header>
<section class="welly">
	<form id="page" method="post" action="" class="well form-horizontal">
		<input type="hidden" name="submit" value="1"/>
		<ul class="nav nav-tabs tab_styled_light">
			<li class="active"><a href="#tab1" data-toggle="tab"><?= lang('page_data') ?></a></li>
			<li><a href="#tab2" data-toggle="tab"><?= lang('page_catalogue') ?></a></li>
		</ul>
		<div class="tab-content tab_content_light">
			<div id="tab1" class="tab-pane active">
				<div class="control-group">
					<label class="control-label"><?= lang('page_image') ?></label>
					<div class="controls">
						<img style="width: 150px; margin-bottom: 5px" id="albumImage"  src="<?=image_url($page->thumb)?>"/>
						<input type="hidden" name="image_id" value="<?=$page->image_id?>"/>
					</div>
					<div class="controls">
						<input id="selectfile" type="button" class="btn" value="<?= lang('select_file') ?>"/>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label"><?php echo lang('page_title') ?></label>
					<div class="controls">
						<input type="text" name="title" class="input-xlarge">
					</div>
				</div>
				<div class="control-group">
					<label class="control-label"><?= lang('page_home') ?></label>
					<div class="controls">
						<input type="checkbox" name="home" value="1" <?=$page->home==1?'checked':''?>/>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label"><?= lang('page_main') ?></label>
					<div class="controls">
						<input type="checkbox" name="main"  value="1"/>
					</div>
				</div>
<!--				<div class="control-group">
					<label class="control-label"><?= lang('page_hot') ?></label>
					<div class="controls">
						<input type="checkbox" name="hot"  value="1"/>
					</div>
				</div>-->
				<div class="control-group">
					<label class="control-label"><?php echo lang('page_summary') ?></label>
					<div class="controls">
						<textarea name="summary"  class="input-xlarge"></textarea>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label"><?php echo lang('page_content') ?></label>
					<div class="controls">
						<textarea id="editor1" name="content"  class="input-xlarge"></textarea>
						<script type="text/javascript">
							var editor = CKEDITOR.replace("editor1");
							CKFinder.setupCKEditor(editor,'/ckfinder/');
						</script>
					</div>
				</div>
			</div>
			<div id="tab2" class="tab-pane">
				<label class="checkbox"><input type="checkbox" id="tab4_check"><b><?= lang('select_all') ?></b></label>
				<? foreach ($catalogues as $catalogue) { ?>
					<label class="checkbox">
						<input type="checkbox" value="<?= $catalogue->id ?>" name="catalogues[]" /><?= $catalogue->pre ?><?= $catalogue->name ?>
					</label>
				<? } ?>
			</div>
		</div>

		<div>
			<input type="submit" class="btn btn-success" value="<?php echo lang('ok') ?>" />
			<button class="btn"><?php echo lang('cancel') ?></button>
		</div>
	</form>
</section>